package testcasegeneration

import (
	"strconv"
)

//scale=n x m
func array2D(n int, m int) string {
	resArr := make([][]int, n)
	for i := 0; i < n; i++ {
		line := make([]int, 0, n)
		for j := 0; j < m; j++ {
			line = append(line, randomIntData(0, 2*m))
		}
		resArr = append(resArr, line)
	}

	resArrPyString := "["
	for i := 0; i < n; i++ {
		resArrPyString += "["
		for j := 0; j < m; j++ {
			resArrPyString += strconv.Itoa(resArr[i][j])
			if j != len(resArr[0])-1 {
				resArrPyString += ","
			}
		}
		resArrPyString += "]"
		if i != len(resArr)-1 {
			resArrPyString += ","
		}
	}
	resArrPyString += "]"

	return resArrPyString

}
